import request from '@/utils/request'

// 查询帮助中心列表
export function listHelpCenter(data) {
  return request({
    url: '/admin/helpcenter/page',
    method: 'put', // 如果后端允许 GET，可以改成 get 并用 params
    data: data
  })
}

// 新增
export function addHelpCenter(data) {
  return request({
    url: '/admin/helpcenter/add',
    method: 'post',
    data
  })
}

// 修改
export function updateHelpCenter(data) {
  return request({
    url: '/admin/helpcenter/update',
    method: 'PUT',
    data
  })
}

// 删除
export function delHelpCenter(id) {
  return request({
    url: `/admin/helpcenter/remove/${id}`,
    method: 'post'
  })
}

// 查询详情
export function getHelpCenter(helpcenterId) {
  return request({
    url: `/admin/helpcenter/helpcenterInfo/${helpcenterId}`,
    method: 'get'
  })
}
 export function activeHelpCenter(hotVideoId, status) {
  return request({
    url: `/admin/helpcenter/active/${hotVideoId}/${status}`,
    method: "post",
  });
}